[#ftl]
[#assign entityName="Goods"]
[#assign pathRoot="/admin/ec/goods/goods_"]

[@jsec.authPage perms=["${entityName}_list"]/]
[#assign prms=jweb.params("prm")]
[@frame.root]
  <!-- Default panel contents -->
  [@frame.title]商品[/@]
  [@frame.searchForm id="search" prms=prms.ogin]
       [@frame.input id="prm.title" label="标题"/]
    [/@]
    [@jsec.authBlock perms=["${entityName}ctrl"]]
  [@frame.toolsBar]
    [@frame.toolsBtn class="btn-success" href="${base}${pathRoot}normal_form.shtml" icon="fa-plus"/]
  [/@]
  [/@]
    
    [#assign datas=frame.createHql(entityName)()]
    
  [@table.table id="block" datas=datas prms=prms.url]
    [@table.box path="id"/]
    [@table.text path="title" name="名称"/]
    [@table.image path="img" name="标题图"/]
    [@table.enum path="goodsType" name="售卖类型"/]
    [@table.map path="status" name="状态" items={"true":"已上架","false":"已下架"}/]
    [@table.text path="showPrice" name="原价"/]
    [@table.text path="price" name="优惠价"/]
    [@table.date path="storeTime" name="创建时间"/]
    [@table.date path="offTime" name="下架时间"/]
    [@table.body path="offTime" name="所属货架"]
    
    [/@]
    [@table.body path="id" name="预览";item]
    
    [/@]
    [@jsec.authBlock perms=["${entityName}_ctrl"]]
    [@table.body name="操作";item]
        [@html.btngroup]
            [@html.href href="${base}${pathRoot}normal_form.shtml?id=${item.id}" icon="fa-edit"/]
            [@html.href href="${base}${pathRoot}remove.shtml?id=${item.id}" class="" icon="fa-remove" confirm="是否删除商品？"/]
        [/@]
    [/@]
    [/@]
    [/@]
    [@frame.pagesBar data=datas prms=jweb.params("prm").url+jweb.sort().url!/]
[/@]